package net.hadto.cyberneticjamband;
import processing.core.PApplet;

public class Square {
	PApplet parent;
	public static final int IDLE = 0;
	public static final int MY_TURN = 1;
	public static final int CPU_TURN = 2;
	GameState gameState;
	float x;
	float y;
	float speed;
	float w;
	float h;
	boolean mouse;
	boolean state=false;
	
	Square(PApplet p, GameState g, float w, float h, float x, float y)
	{
		parent = p;
		gameState = g;
		this.x=x;
		this.y=y;
		this.w = w;
		this.h = h;
		mouse = false;
	}
	
	void display()
	{
		if(state==false) parent.fill(255,255);
		if(state==true)
			if (gameState.getGameState()==1) parent.fill(255,0,0);
			else if(gameState.getGameState()==2) parent.fill(0,0,255);
		parent.noStroke();
		parent.rect(x,y,w,h);
	}
}
